package com.acmetelecom;

import org.joda.time.DateTime;

import com.acmetelecom.fakes.FakeGenerator;

public class Runner {
	
	public static void main(String[] args) throws Exception{
		System.out.println("Running...");
		BillGenerator g = new BillGenerator(HtmlPrinter.getInstance());
		BillingSystem billingSystem = new BillingSystem(g);
		
		
		DateTime dt = new DateTime(2011, 11, 26, 23, 0, 0);

        billingSystem.callInitiated("447722113434", "447766814143");
        sleepSeconds(20);
        billingSystem.callCompleted("447722113434", "447766814143");
        billingSystem.callInitiated("447722113434", "447711111111");
        sleepSeconds(30);
        billingSystem.callCompleted("447722113434", "447711111111");
        billingSystem.callInitiated("447777765432", "447711111111");
        sleepSeconds(60);
        billingSystem.callCompleted("447777765432", "447711111111");
        billingSystem.createCustomerBills();
	}
	
	private static void sleepSeconds(int n) throws InterruptedException {
        Thread.sleep(n * 1000);
	}

}
